package slu.appli.wodtimer.stringparser;

import slu.appli.tools.parser.stringparser.impl.AbstractEscapeChar;
import slu.appli.tools.parser.stringparser.interfaces.model.ModelBuilderInterface;
import slu.appli.wodtimer.DataContext;

public class EscapeChar2Minutes 
extends AbstractEscapeChar {

	public EscapeChar2Minutes() {
		super('m',"2Minutes");
	}

	@Override
	public void processPreviousString(final String value, final ModelBuilderInterface modelBuilder) {
		if (value != null) {
			DataContext context = (DataContext) modelBuilder.getDataContext();
			context.addToElapse(context.convert(value) * 60);
		}
	}

	@Override
	public void processNextString(final String value, final ModelBuilderInterface modelBuilder) {
	}

}
